package com.dayilyword.config.resultFormat;

import lombok.Data;

/**
 * @author sc
 */
@Data
public class Result<T> {

    private Integer code;

    private String msg;

    private T data;

    public Result(ResultEnum resultEnum) {
        this(resultEnum, null);
    }

    public Result(ResultEnum resultEnum, T data) {
        this.msg = resultEnum.getMsg();
        this.code = resultEnum.getCode();
        this.data = data;
    }

}
